/**
  *@File文件:ShopBillWrapper.java
  *@Date日期:2017年7月14日 下午7:06:10
  *@Copyright版权:Corporation 2017
  */
package com.qiaomengapp.bean;

import java.util.Calendar;
import java.util.Date;

import com.qiaomengapp.util.DateUtils;

/**
 * @Description描述: 店铺信息包装类
 * @Author作者 wangzongwen
 * @Date日期:2017年7月14日
 */
public class ShopBillWrapper extends ShopBill {
	// 商品描述
	private String goodDesc;

	// 商品购买数量
	private Integer num;
	
	//信息时间的字符串形式
	private String createTimeStr;
	
	

	@Override
	public void setCreateTime(Date createTime) {
		super.setCreateTime(createTime);
		//得到日期对应的小时
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(createTime);
		int hour = calendar.get(Calendar.HOUR_OF_DAY);
		//得到小时对应的时段
		String duringDay = DateUtils.getDuringDay(hour);
		//得到日期字符串
		this.createTimeStr=DateUtils.formatDate(createTime, "yyyy-MM-dd")+" "+duringDay+" "+DateUtils.formatDate(createTime, "HH:mm:dd");
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public String getGoodDesc() {
		return goodDesc;
	}

	public void setGoodDesc(String goodDesc) {
		this.goodDesc = goodDesc;
	}

	@Override
	public String toString() {
		return "ShopBillWrapper [goodDesc=" + goodDesc + ", toString()=" + super.toString() + "]";
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public String getCreateTimeStr() {
		return createTimeStr;
	}

	public void setCreateTimeStr(String createTimeStr) {
		this.createTimeStr = createTimeStr;
	}

}
